1. Field of the Invention
The present invention relates to an amplitude detection apparatus, and, for example, relates to an amplitude detection apparatus incorporated in a machine angle detector or a machine position detector.
2. Related Art
Generally, a rotary encoder is used as a position detector detecting a position of a moving body (e.g., a servo motor) making a rotational movement, or a linear scale is used as a position detector detecting a position of a moving body (e.g., a robot arm) making a linear reciprocating movement for accurately controlling movement of the machine. An output signal from the position detector is periodically subjected to analog-digital conversion (sampling), converted into a value indicating the position, and the resultant digital signal is used. To accurately detect the position of the moving body, it is necessary to accurately detect amplitudes of sine waves (sin wave and cos wave) of the moving body. The amplitudes are conventionally obtained from a maximum value and a minimum value of digital signals (sin signal and cos signal) resulting from the sampling.
However, if the maximum value and the minimum value are selected from among the digital signals obtained discretely by the sampling, they often differ from a maximum value and a minimum value of an actual analog sine wave, respectively. Normally, a sampling cycle is shorter than a sine wave cycle. However, if the sine wave cycle is shortened to thereby reduce a difference between the sine wave cycle and the sampling cycle, it is highly likely that an error increases between the maximum value obtained from the digital signals and that of the actual sine wave and an error increases between the minimum value obtained from the digital signals and that of the actual sine wave.
It is an object of the present invention to provide an amplitude detection apparatus capable of highly accurately detecting an amplitude of a waveform signal even if a difference between a cycle of an analog waveform signal based on a moving body and a sampling cycle of the waveform signal is small.